<?php
require_once 'lib/swift_required.php';

ECHO "PRUEBA DE EMAIL "; 
// Create the Transport
$transport = Swift_SmtpTransport::newInstance('mail.3tech-panama.com', 25)
->setUsername('hcastillo@3tech-panama.com')
->setPassword('Petv8cp9y627')
;
ECHO "PRUEBA DE EMAIL 2 ";
/*
 You could alternatively use a different transport such as Sendmail or Mail:

// Sendmail
$transport = Swift_SendmailTransport::newInstance('/usr/sbin/sendmail -bs');

// Mail
$transport = Swift_MailTransport::newInstance();
*/

// Create the Mailer using your created Transport
$mailer = Swift_Mailer::newInstance($transport);
ECHO "PRUEBA DE EMAIL 3 ";
// Create a message
$message = Swift_Message::newInstance('Wonderful Subject')
->setFrom(array('hcastillo@3tech-panama.com' => 'John Doe'))
->setTo(array('castilloharry@gmail.com', 'harrisn.cap@hotmail.com' => 'A name'))
->setBody('Here is the message itself')
;
ECHO "PRUEBA DE EMAIL 4 ";
// Send the message
$result = $mailer->send($message);
printf("Sent %d messages\n", $result);
ECHO "PRUEBA DE EMAIL 5 ";
ECHO "<br>EMAIL ENVIADO";
?>